﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace B.T.BasicData.Infraeturcture
{
    public interface IBaseRepository<T> where T : class
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        Task<int> AddAnyx(T t);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        Task<int> Update(T t);
        /// <summary>
        /// 条件查询
        /// </summary>
        /// <param name="exp"></param>
        /// <returns></returns>
        Task<T> GetValue(Expression<Func<T, bool>> exp);
        /// <summary>
        /// 查找数据
        /// </summary>
        /// <returns></returns>
        IQueryable<T> Getlist();
    }
}
